﻿
using System.Web.WebPages;
namespace CatagorizrMvc4 {
    public static class CatagorizrMvc4BootStrapper {

        public static void Boot() {

            DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Tablet") {
                ContextCondition = (context => {
                    CatagorizrMvc4.Detector detector = new Detector();
                    detector.Detect(context);
                    if (detector.Device == Detector.DeviceType.Tablet)
                        return true;
                    else
                        return false;
                })
            });
            DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Mobile") {
                ContextCondition = (context => {
                    CatagorizrMvc4.Detector detector = new Detector();
                    detector.Detect(context);
                    if (detector.Device == Detector.DeviceType.Mobile)
                        return true;
                    else
                        return false;
                })
            });
            DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("Tv") {
                ContextCondition = (context => {
                    CatagorizrMvc4.Detector detector = new Detector();
                    detector.Detect(context);
                    if (detector.Device == Detector.DeviceType.Tv)
                        return true;
                    else
                        return false;
                })
            });
        }

    }
}
